export const request = (params) => {
  return new Promise((resolve, reject) => {
    wx.showLoading({
      title: '加载中',
      mask: true
    })
    const baseUrl = "https://fuze-energy.com/power-cut"
    wx.request({
      ...params,
      url: baseUrl + params.url,
      success: (result) => {
        resolve(result)
      },
      fail: (err) => {
        reject(err)
      },
      complete() {
        wx.hideLoading({
          success: (res) => {},
        })
      }
    })
  })
} 